# Maintainer: Ionut Biru <ibiru@archlinux.org>
# Maintainer: Jan de Groot <jgc@archlinux.org>
# Contributor: Gabriel Martinez < reitaka at gmail dot com >

pkgname=libusbmuxd
pkgver=2.0.2
pkgrel=1
pkgdesc="USB Multiplex Daemon"
url="https://marcansoft.com/blog/iphonelinux/usbmuxd/"
arch=('x86_64')
license=('LGPL2.1' 'GPL2')
depends=('libusb' 'libplist')
makedepends=(git)
conflicts=('usbmuxd<1.0.9')
_commit=ce98c346b7c1dc2a21faea4fd3f32c88e27ca2af
source=("git+https://github.com/libimobiledevice/libusbmuxd#commit=$_commit")
sha256sums=('SKIP')

pkgver() {
  cd $pkgname
  git describe --tags | sed 's/-/+/g'
}

check() {
  cd $pkgname
  make check
}

prepare() {
  cd $pkgname
  NOCONFIGURE=1 ./autogen.sh
}

build() {
  cd $pkgname
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname
  make DESTDIR="${pkgdir}" install
}
